import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('counter', () => {

  let openPublishForum=ref(null)

  let isOpenAiTalking=ref(false)

  let AiChartHistory=ref([])

  let isShowAIHostory=ref(false)

  let UserMessage=ref(null)

  let loginStatus=ref(false)

  let findSuitableJournalisms=ref({
    sentiment:'all',
    typeId:0,
    startTime:null,
    endTime:null,
    originId:0,
    stockId:null,
    pageNo:null,
    pageSize:8,
    searchContent:'',
  })

  let JournalismAiChartHistory=ref([])

  let HeaderNavigate=ref(99)

  let OnlyVisitToday=ref(false)

  return { OnlyVisitToday,HeaderNavigate,loginStatus,JournalismAiChartHistory,findSuitableJournalisms,UserMessage,openPublishForum,isOpenAiTalking,AiChartHistory,isShowAIHostory }

},{
  persist:{
    key:'counter', // 存储的key, 默认store.$id
    storage: sessionStorage, // 存储的类型，默认localStorage
  }
})
